<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>css 实现滚动提示符</title>
        <style>
            * {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
            }
            body {
                display: flex;
                justify-content: space-evenly;
                align-items: center;
                height: 100vh;
                background-color: #111;
            }
            .mouse-scroll {
                position: relative;
                height: var(--item-height);
                aspect-ratio: 1.2/2;
                border: calc(var(--item-height) / 15) solid #ebff0d;
                border-radius: calc(var(--item-height) / 2);
            }
            .mouse-scroll::before {
                position: absolute;
                content: "";
                width: calc(var(--item-height) / 10);
                aspect-ratio: 1/1;
                border-radius: 50%;
                background: #ebff0d;
                left: 50%;
                transform: translateX(-50%);
                animation: scroll 2.5s infinite;
            }
            .arrow-scroll {
                position: relative;
                height: var(--item-height);
            }
            .arrow {
                position: absolute;
                top: 0;
                left: 50%;
                border: solid #ebff0d;
                border-width: 0 calc(var(--item-height) / 10) calc(var(--item-height) / 10) 0;
                padding: calc(var(--item-height) / 6);
                transform: translatex(-50%) rotate(45deg);
            }
            .arrow:nth-child(2) {
                animation: arrow1 1.5s ease-in-out infinite;
            }
            .arrow:nth-child(3) {
                animation: arrow2 1.5s ease-in-out infinite;
            }

            @keyframes scroll {
                from {
                    bottom: 80%;
                    opacity: 1;
                }
                to {
                    bottom: 20%;
                    opacity: 0;
                }
            }

            @keyframes arrow1 {
                to {
                    opacity: 0;
                    top: 100%;
                }
            }
            @keyframes arrow2 {
                to {
                    opacity: 0;
                    top: 50%;
                }
            }
        </style>
    </head>
    <body>
        <div class="mouse-scroll" style="--item-height: 8rem"></div>

        <div class="arrow-scroll" style="--item-height: 8rem">
            <div class="arrow"></div>
            <div class="arrow"></div>
            <div class="arrow"></div>
        </div>
    </body>
</html>
